package model

import "gorm.io/gorm"

type User struct {
	gorm.Model
	Username string `gorm:"type:varchar(50)"`
	Password string `gorm:"type:varchar(50)"`
}
type Role struct {
	gorm.Model
	RoleName string `gorm:"type:varchar(50)"`
}
type Node struct {
	gorm.Model
	Node string `gorm:"type:varchar(50)"`
}
type UserRole struct {
	gorm.Model
	Uid int `gorm:"type:int"`
	Rid int `gorm:"type:int"`
}
type RoleNode struct {
	gorm.Model
	Nid int `gorm:"type:int"`
	Rid int `gorm:"type:int"`
}
type Repo struct {
	gorm.Model
	RepoCode string `gorm:"type:varchar(50)"`
	RepoName string `gorm:"type:varchar(50)"`
}
type RepoOrder struct {
	gorm.Model
	OrderCode  string `gorm:"type:varchar(50)"`
	OrderNum   int    `gorm:"type:int"`
	OrderPrice int    `gorm:"type:int"`
	Rid        int    `gorm:"type:int"`
}
type RepoOrderList struct {
	OrderId    int
	OrderCode  string
	OrderNum   int
	OrderPrice int
	RepoCode   string
	RepoName   string
}
type Good struct {
	gorm.Model
	GoodCode string `gorm:"type:varchar(50)"`
	GoodName string `gorm:"type:varchar(50)"`
}
type GoodOrder struct {
	gorm.Model
	OrderCode  string `gorm:"type:varchar(50)"`
	OrderNum   int    `gorm:"type:int"`
	OrderPrice int    `gorm:"type:int"`
	Gid        int    `gorm:"type:int"`
}
type GoodOrderList struct {
	OrderId    int
	OrderCode  string
	OrderNum   int
	OrderPrice int
	GoodCode   string
	GoodName   string
}

type PerSon struct {
	gorm.Model
	PerSonCode  string `gorm:"type:varchar(50)"`
	PerSonName  string `gorm:"type:varchar(50)"`
	PerSonPhone string `gorm:"type:varchar(50)"`
}
type PerSonOrder struct {
	gorm.Model
	OrderCode string `gorm:"type:varchar(50)"`
	OrderFrom string `gorm:"type:varchar(50)"`
	OrderTo   string `gorm:"type:varchar(50)"`
	Pid       int    `gorm:"type:int"`
}
type PerSonOrderList struct {
	OrderId     int
	OrderCode   string
	OrderFrom   string
	OrderTo     string
	PerSonCode  string
	PerSonName  string
	PerSonPhone string
}

type Car struct {
	gorm.Model
	CarCode  string `gorm:"type:varchar(50)"`
	CarName  string `gorm:"type:varchar(50)"`
	CarPrice int    `gorm:"type:varchar(50)"`
}
type CarOrder struct {
	gorm.Model
	OrderCode  string `gorm:"type:varchar(50)"`
	OrderName  string `gorm:"type:varchar(50)"`
	OrderPrice int    `gorm:"type:int"`
	Cid        int    `gorm:"type:int"`
}
type CarOrderList struct {
	OrderCode  string
	OrderName  string
	OrderPrice int
	CarCode    string
	CarName    string
	CarPrice   int
}
